<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<%@ taglib uri="http://www.atg.com/taglibs/daf/dspjspTaglib1_0"
	prefix="dsp"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/core" prefix="c"%>
<%@ taglib uri="http://java.sun.com/jsp/jstl/fn" prefix="fn"%>
<%@ page isELIgnored="false"%>
<dsp:page>
	<dsp:importbean bean="/atg/commerce/order/ShoppingCartModifier"/>
	<dsp:getvalueof var="order" bean="ShoppingCartModifier.shoppingCart.last"/>
	<dsp:getvalueof var="shippingGrouop" bean="ShoppingCartModifier.shoppingCart.last.shippingGroups[0]"/>
	<dsp:getvalueof var="paymentGrouop" bean="ShoppingCartModifier.shoppingCart.last.paymentGroups[0]"/>
	<dsp:importbean bean="/atg/dynamo/droplet/ForEach"/>
	<dsp:importbean bean="/atg/commerce/order/purchase/CommitOrderFormHandler"/>
	<dsp:importbean bean="/atg/dynamo/droplet/ErrorMessageForEach" />
	<dsp:importbean bean="/atg/commerce/order/OrderLookup"/>

	<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<%@include file="style.jspf"%>
<title>demo</title>
	</head>
	<body>
		<div id="wrap" class="clear-block">
						<div id="header">
							<dsp:include page="header.jsp" />
						</div>
						<div id="mainnav">
							<dsp:include page="categoryBar.jsp" />
						</div>
						<div class="checkout">
							<dsp:droplet name="ErrorMessageForEach">
							  <dsp:param bean="ShoppingCartModifier.formExceptions" name="exceptions" />
							  <dsp:param name="propertyNameTable" value="firstName=First Name, address1=ssss, creditCartNumber=11111"/>
							  <dsp:oparam name="output">
							       <div class="error">
							         <dsp:valueof param="message"/>
							       </div>
							  </dsp:oparam>
							</dsp:droplet>

							<div class="orderSummary">
								<p>
									<span class="blod">Thank you!</span> Your order submitted
									successfully, order <span class="green"># <dsp:valueof bean="ShoppingCartModifier.shoppingCart.last.id"/></span>.
								</p>
				              <dsp:droplet name="ForEach">
				                 <dsp:param name="array" bean="ShoppingCartModifier.shoppingCart.last.commerceItems"/>
				                 <dsp:param name="elementName" value="commerceItem"/>
				                 <dsp:oparam name="outputStart">
				                    <div class="listBox">
					                    <ul class="head">
					                        <li class="item">Item</li>
					                        <li class="qty">Quantity</li>
					                        <li class="price">Amount</li>
					                    </ul>
				                   </div>
				                 </dsp:oparam>
				                 <dsp:oparam name="output">
				                    <div class="listBox">
					                    <ul>
					                        <li class="item">
					                            <p class="name">
					                              <dsp:a href="productDetail.jsp">
												   								<dsp:param name="pId" param="commerceItem.auxiliaryData.productId"/>
					                               <dsp:valueof param="commerceItem.auxiliaryData.productRef.displayName"></dsp:valueof>
												   							</dsp:a>
					                            </p>
					                            <p>SKU: <span>
												  								<dsp:valueof param="commerceItem.catalogRefId"/>
																			</span></p>
					                        </li>
					                        <li class="qty">
											  						<dsp:valueof param="commerceItem.quantity"/>
																	</li>
					                        <li class="price">
																	 <dsp:valueof param="commerceItem.priceinfo.amount" converter="currency"/>
																	</li>
					                    </ul>
				                   </div>
				                 </dsp:oparam>
				              </dsp:droplet>
											<div class="totalBox">
												<table>
													<tr>
														<td width="85%" class="subTotal">Sub Total</td>
														<td width="15%" class="subTotal"><dsp:valueof bean="ShoppingCartModifier.shoppingCart.last.priceInfo.amount" converter="currency"/></td>
													</tr>
													<tr>
														<td>Tax</td>
														<td ><dsp:valueof bean="ShoppingCartModifier.shoppingCart.last.taxPriceInfo.amount" converter="currency"/></td>
														<!--
														<td>$10.00</td>
														-->
													</tr>
														<dsp:getvalueof var="samount" bean="ShoppingCartModifier.shoppingCart.last.priceInfo.amount"/>
														<dsp:getvalueof var="staxamount" bean="ShoppingCartModifier.shoppingCart.last.taxPriceInfo.amount"/>
													<tr>
														<td class="total">Total</td>
														<td class="total"><dsp:valueof value="${samount+staxamount}" converter="currency"/></td>
													</tr>
												</table>
											</div>

								</div>

                <div class="paymentInfo">
                    <h4>Payment Information</h4>
                    <div class="info">
                    	<p class="first"><dsp:valueof bean="ShoppingCartModifier.shoppingCart.last.paymentGroups[0].billingAddress.firstName"/> <dsp:valueof bean="ShoppingCartModifier.shoppingCart.last.paymentGroups[0].billingAddress.lastName"/>, <dsp:valueof bean="ShoppingCartModifier.shoppingCart.last.paymentGroups[0].creditCardType"/> <dsp:valueof bean="ShoppingCartModifier.shoppingCart.last.paymentGroups[0].creditCardNumber"/></p>
                        <p><dsp:valueof bean="ShoppingCartModifier.shoppingCart.last.paymentGroups[0].billingAddress.address1"/></p>
                        <p><dsp:valueof bean="ShoppingCartModifier.shoppingCart.last.paymentGroups[0].billingAddress.city"/>, <dsp:valueof bean="ShoppingCartModifier.shoppingCart.last.paymentGroups[0].billingAddress.state"/> <dsp:valueof bean="ShoppingCartModifier.shoppingCart.last.paymentGroups[0].billingAddress.postalCode"/></p>
                        <p><dsp:valueof bean="ShoppingCartModifier.shoppingCart.last.paymentGroups[0].billingAddress.country"/></p>
                    </div>
                </div>
								

			</div>

			<div id="footer"><jsp:include page="footer.jsp" /></div>
		</div>
	</body>
</dsp:page>
</html>